<?php foreach ($user_photos as $photo): ?>
    <li>
        <a href="<?php echo BASE_PATH; ?>/photos/view/<?php echo $photo["Photo"]["id"]; ?>"><img src="<?php echo BASE_PATH; ?>/photos/thumbs/<?php echo $photo["Photo"]["filename"]; ?>" alt="description" /><img src="<?php echo BASE_PATH; ?>/photos/thumbs/<?php echo $photo["Photo"]["filename"]; ?>" alt="description" class="preview" /></a>
    </li>
<?php endforeach ?>